Errata for the Second Printing (first edition)

`book.html | TOC | CD-ROM | References | Errata | Tutorial Trail Map`

# Errata for the Second Printing (first edition)

The following errors have been fixed in the second printing of The Java Tutorial. The third printing is identical to the second printing.

- A few copies of the book start on page 15. If your copy has this problem, please return to where you purchased the book and ask them to exchange it for a good copy.
- On page 13, in the section Create a Java Source File, the filename `HelloWorld` should be `HelloWorld.java`.
- The Date class does not deal with years that are greater than 1970. So the code sample at bottom of page 80 should read:

  >     Date myBirthday = new Date(1996, 8, 30);

- In the Pass-by-Value section on page 100 the first line in the first paragraph should read arguments are passed by value.
- The table on page 106 has an error. The check mark in the package/subclass box should be in the package/package box.
- On page 110, in the section called Public, the class Alpha should be declared public. Like this:

  >     package Greek;

  >     public class Alpha {
  >         public int iampublic;
  >         public void publicMethod() {
  >             System.out.println("publicMethod");
  >         }
  >     }

- The code sample at top of page 117 has two errors:
  1. the line `int i;` should be removed.
  2. the `for` loop should read:

     >     for (int i = 0; i <= numImages; i++) {

  Thus the code sample should read:

  >     class AnimationThread extends Thread {
  >         int framesPerSecond;
  >         int numImages;
  >         Image[] images;

  >         AnimationThread(int fps, int num) {

  >             super("AnimationThread");
  >             this.framesPerSecond = fps;
  >             this.numImages = num;

  >             this.images = new Image[numImages];
  >             for (int i = 0; i <= numImages; i++) {
  >                 . . .
  >                 // Load all the images.
  >                 . . .
  >             }
  >         }
  >     }

- The second bullet in the bulleted list at the top of page 121 should read is in the same package as the superclass.
- The line `String input;` should be deleted from the code sample at bottom of page 333.
- On page 548, in the last paragraph of the Platform Specific Details section, the filename `Hello-World.stubs` should be `HelloWorld.stubs`.
- The back of the book contains four pages that describe the CD-ROM. These pages consistently misspell the product name HotJava; HotJava is one word not two.
- On the fourth Page of the CD-ROM pages, the Known Bugs section contains a typo. Note that this is reason should read Note that this is the reason.

`book.html | TOC | CD-ROM | References | Errata | Tutorial Trail Map`